/*
 * Login Window
 */
MyDesktop.LoginWindow = Ext.extend(Ext.app.Module, {
    init : function(){
		this.launcher = {
            text: ' ',
            handler : this.createWindow
        }        
		LoginWindow = this;
    },

    createWindow : function(){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('loginWindow');
        if(!win){
            win = desktop.createWindow({
                id: 'loginWindow',
                title:'Please Login',
                width:400,
                height:250,
                iconCls: 'bogus',
                animCollapse:false,
				constrainHeader:true,
				autoLoad: {url:"login.html", scripts:true}
            });
        }
        win.show();
    },
	
	closeWindow : function() {
		var desktop = this.app.getDesktop();
        var win = desktop.getWindow('loginWindow');
		if (win) {
			win.close();
		}	
	}
});
